#include "ClassSkillModel.h"



namespace
{
QString SKILL_GROUP_NAME = "Skill";
}

ClassSkillModel::ClassSkillModel(QObject *parent) :
    ItemModel(parent)
{
}



void ClassSkillModel::setRootItem(AbstractItem* root)
{
    ItemGroup* skills = dynamic_cast<ItemGroup*>(root);
    if (!skills) return;

    if (!skills->name().toLower().contains(SKILL_GROUP_NAME)) return;

    ItemModel::setRootItem(root);
}



QVariant ClassSkillModel::data(const QModelIndex &index, int role) const
{
    if (role != Qt::CheckStateRole) return ItemModel::data(index, role);


    return QVariant();
}
